from django.urls import path, include
from rest_framework.routers import DefaultRouter

from DB_demo import views
from DB_demo.views import process_data, testupdate
from .views import DisnameSimilarityView, DisnameSimilarityViewOutcome, AllexposurenameSimilarityView, AlloutcomenameSimilarityView
from .views import GenenameSimilarityView, GenenameSimilarityViewOutcome
from .views import ProteinnameSimilarityView, ProteinnameSimilarityViewOutcome

router = DefaultRouter()
router.register('Gwas', views.GwasViewSet)

# router.register('MRresults', views.MRresultsViewSet)
# router.register('MRresults1E5', views.MRresults1E5ViewSet)
# router.register('MRresults5E8', views.MRresults5E8ViewSet)
router.register('MrResultAll58465E8', views.MrResultAll58465E8ViewSet)
router.register('Papers', views.PapersViewSet)
router.register('PaperNewDis2Dis', views.PaperNewViewSet)
router.register('Mrdis2Dis1E5', views.Mrdis2Dis1E5ViewSet, basename='Mrdis2Dis1E5')
router.register('Mrdis2Dis5E6', views.Mrdis2Dis5E6ViewSet, basename='Mrdis2Dis5E6')
router.register('Mrdis2Dis5E8', views.Mrdis2Dis5E8ViewSet, basename='Mrdis2Dis5E8')

router.register('Mreqtl2Dis1E5', views.Mreqtl2Dis1E5ViewSet, basename='Mreqtl2Dis1E5')
router.register('Mreqtl2Dis5E6', views.Mreqtl2Dis5E6ViewSet, basename='Mreqtl2Dis5E6')
router.register('Mreqtl2Dis5E8', views.Mreqtl2Dis5E8ViewSet, basename='Mreqtl2Dis5E8')

router.register('Mrpqtl2Dis1E5', views.Mrpqtl2Dis1E5ViewSet, basename='Mrpqtl2Dis1E5')
router.register('Mrpqtl2Dis5E6', views.Mrpqtl2Dis5E6ViewSet, basename='Mrpqtl2Dis5E6')
router.register('Mrpqtl2Dis5E8', views.Mrpqtl2Dis5E8ViewSet, basename='Mrpqtl2Dis5E8')

router.register('CombinedResults', views.CombinedResultsView, basename='CombinedResults')
router.register('Phewas', views.PhewasViewSet, basename='Phewas')
router.register('Phewas2', views.Phewas2ViewSet, basename='Phewas2')

router.register('Pubdis2Dis', views.Pubdis2DisViewSet, basename='Pubdis2Dis')
router.register('Pubeqtl2Dis', views.Pubeqtl2DisViewSet, basename='Pubeqtl2Dis')
router.register('Pubpqtl2Dis', views.Pubpqtl2DisViewSet, basename='Pubpqtl2Dis')
router.register('Mrall', views.MrallViewSet, basename='Mrall')
router.register('Mrallnew', views.MrallnewViewSet, basename='Mrallnew')
router.register('Disname', views.DisnameViewSet)
router.register('GWASdataset_search', views.GWASdatasetViewSet, basename='GWASdataset')
router.register('Downpagesingle', views.DownloadpagesingleViewSet, basename='Downpagesingle')

router.register('Browsedisname', views.BrowsedisnameViewSet, basename='Browsedisname')
router.register('Browsegenename', views.BrowsegenenameViewSet, basename='Browsegenename')
router.register('Browseproname', views.BrowsepronameViewSet, basename='Browseproname')
router.register('BrowseMetname', views.BrowseMetnameViewSet, basename='BrowseMetname')
router.register('BrowseCpgname', views.BrowsecpgsiteViewSet, basename='BrowseCpgname')

# router.register('disname_similarity', views.DisnameSimilarityView, basename='disname_similarity')

urlpatterns = [
    path('', include(router.urls)),
    path('get_csv_data/', views.get_csv_data, name='get_csv_data'),
    path('process_data/', views.process_data, name='process_data'),
    path('process_data_one/', views.process_data_one, name='process_data_one'),
    path('testupdate/', views.testupdate),
    path('upload_csv_one/', views.upload_csv_one, name='upload_csv_one'),
    path('upload_csv/', views.upload_csv, name='upload_csv'),
    path('upload_csv_F/', views.upload_csv_F, name='upload_csv'),
    path('calPower/', views.calPower),
    path('disname_similarity/', DisnameSimilarityView.as_view(), name='disname_similarity'),
    path('Allexposurename_similarity/', AllexposurenameSimilarityView.as_view(), name='Allexposurename_similarity'),
    path('Alloutcomename_similarity/', AlloutcomenameSimilarityView.as_view(), name='Alloutcomename_similarity'),
    path('disname_similarity_outcome/', DisnameSimilarityViewOutcome.as_view(), name='disname_similarity_outcome'),
    path('Genename_similarity/', GenenameSimilarityView.as_view(), name='Genename_similarity'),
    path('Genename_similarity_outcome/', GenenameSimilarityViewOutcome.as_view(), name='Genename_similarity_outcome'),
    path('Proteinname_similarity/', ProteinnameSimilarityView.as_view(), name='Proteinname_similarity'),
    path('Proteinname_similarity_outcome/', ProteinnameSimilarityViewOutcome.as_view(), name='Proteinname_similarity_outcome'),
    path('download_gwasData/', views.download_gwasData, name='download_gwasData'),
    # path('/GetPaper/<int:paper_id>/', views.get_paper)
]


